package itheima_04;

//自动装箱拆箱
public class IntegerDemo {
    public static void main(String[] args) {
        Integer i = Integer.valueOf(100);//装箱
        Integer ii = 100;//自动装箱
        System.out.println("------------");
        ii = ii.intValue() + 200;//先拆箱后自动装箱
        System.out.println(ii);
        ii += 200;//先拆箱后自动装箱
        System.out.println(ii);
        System.out.println("----------");
        Integer iii = null;
//        iii += 300;
//        System.out.println(iii);  NullPointerException 空指针异常
    }
}
